//
//  CustomElemCmd.h
//  TIMChat
//
//  Created by wilderliao on 16/6/22.
//  Copyright © 2016年 AlexiChen. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CustomElemCmd : NSObject

@property (nonatomic, assign) NSInteger action;             // 对应CustomElemCmd命令字，必须字段
@property (nonatomic, strong) NSString *videoUrl;            // 自定义参数字段，可为空，为空不传
@property (nonatomic, strong) NSString *chatQuestion;            // 自定义参数字段，可为空，为空不传
@property (nonatomic, strong) NSString *price;            // 自定义参数字段，可为空，为空不传
@property (nonatomic, strong) NSString *imageUrl;            // 自定义参数字段，可为空，为空不传
@property (nonatomic, strong) NSString *giftBubbleImage;            // 自定义参数字段，可为空，为空不传

@property (nonatomic, strong) NSString *giftMsgImage;            // 自定义参数字段，可为空，为空不传
@property (nonatomic, strong) NSString *giftName;            // 自定义参数字段，可为空，为空不传
@property (nonatomic, strong) NSString *payId;            // 自定义参数字段，可为空，为空不传
@property (nonatomic, strong) NSString *videoCover; // 封面
@property (nonatomic, strong) NSString *videoId;// 视频id

@property (nonatomic, strong) NSMutableDictionary *customInfo;

- (NSInteger)msgType;

- (instancetype)initWith:(NSInteger)command;
- (instancetype)initWith:(NSInteger)command param:(NSString *)param;
- (instancetype)initWith:(NSInteger)command chatQuestion:(NSString *)chatQuestion;
- (instancetype)initWith:(NSInteger)userACtion urlStr:(NSString *)urlStr priceStr:(NSString *)priceStr imageStr:(NSString *)imageStr withPayId:(NSString *)payID;
- (instancetype)initWithGift:(NSInteger)userACtion priceStr:(NSString *)priceStr giftBubbleImageUrl:(NSString *)giftBubbleImage giftMsgImageUrl:(NSString *)giftMsgImage NameStr:(NSString *)nameStr;

+ (instancetype)parseCustom:(TIMCustomElem *)elem;

// 将消息封装成Json，然后下发
- (NSData *)packToSendData;
//
- (instancetype)initFaceWith:(NSInteger)userACtion cmd:(int)cmdTag rejectIdStr:(NSString *)rejectIdStr callIdStr:(NSString *)callIdStr;
- (id)parseFaceCustom:(TIMCustomElem *)elem;

@property (nonatomic, assign) int      command;            // 自定义参数字段，可为空，为空不传
@property (nonatomic, strong) NSString *callId;            // 自定义参数字段，可为空，为空不传
@property (nonatomic, strong) NSString *rejectId;            // 自定义参数字段，可为空，为空不传
@property (nonatomic, strong) NSString *videoPhoneMessage;            // 自定义参数字段，可为空，为空不传
@property (nonatomic, strong) NSDictionary *videoPhoneMessageDic;            // 自定义参数字段，可为空，为空不传

- (NSData *)faceTofaceSendData;


@end
